<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- <link rel="stylesheet" href="./index.css"> -->
  <link rel="stylesheet" href="//at.alicdn.com/t/c/font_2466124_24j5td877k9.css">
  <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">
</head>

<body>
  <div class="w">
    <aside>
      <h1>黑马头条</h1>
      <ul>
        <li><a href="../content/content.html"><i class="iconfont icontext"></i>内容管理</a></li>
        <li><a href="../publish/publish.html"><i class="iconfont iconsend"></i>发布文章</a></li>
      </ul>
    </aside>

    <div class="main">
      <header>
        <div class="info">
          <span id="username">67</span>
          <a href="#" class="logout">退出</a>
        </div>
      </header>

      <div class="card">
        <div class="card-header">
          发布文章
        </div>
        <div class="card-body">
          <form class="article-form">
            <input type="text" class="id" hidden name="id">
            <p>
              标题：<input class="form-control title" type="text" name="title">
            </p>
            <p>
              频道：
              <select name="channel_id" id="opt" class="channel_id">
                <option value="1">请选择文章频道</option>
              </select>
            </p>
            <p>
              <label for="img" class="cv">封面：</label>
              <!-- 主要在页面中显示的还是label，通过label去触发，文件选择框是隐藏的 -->
              <label for="img" class="place">+</label>
              <input type="file" name="img" id="img" class="cover" hidden name="cover">
              <img src="" alt="" class="rounded">
            </p>
            <p>
              <label>内容：</label>
              <!-- 记录富文本编辑器，用于表单提交 -->
              <div id="editor—wrapper">
                <div id="toolbar-container"><!-- 工具栏 --></div>
                <div id="editor-container"><!-- 编辑器 --></div>
              </div>

              <textarea hidden class="content" name="content" id="" cols="30" rows="10"></textarea>
            </p>

            <button class="btn btn-primary">发布</button>
          </form>
        </div>
      </div>

    </div>
  </div>

  <%if (htmlWebpackPlugin.options.useCDN){%>
      <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/js/bootstrap.bundle.min.js"></script>
      <script src="https://unpkg.com/form-serialize@0.7.2/index.js"></script>
      <script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script>
      <script src="https://unpkg.com/@wangeditor/editor@latest/dist/index.js"></script>
  <%}%>
</body>

</html>